Skip to content

Conversation

@hugovk
Copy link
Member

@hugovk hugovk commented Dec 30, 2024

And run on GitHub Actions via pre-commit.

We could also add this repo to https://pre-commit.ci/ so it will autofix PRs?


📚 Documentation preview 📚: https://pydocs-translation-dashboard--28.org.readthedocs.build/

Copy link
Collaborator

@m-aciek m-aciek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, it looks like comprehensive set of linters!

We could also add this repo to https://pre-commit.ci/ so it will autofix PRs?

I think it's a good idea 👍

Comment on lines +25 to +28
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.30.0
hooks:
- id: check-github-workflows
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it superfluous? (Unless I'm missing something.) We don't store JSON schemas AFAIC nor have it in a near perspective.

Copy link
Member Author

@hugovk hugovk Dec 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can help with the files in .github/workflows/. For example, if we'd accidentally put runs-on: ubuntu it would say:

.github/workflows/update.yml:11:14: label "ubuntu" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-22.04", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file [runner-label]

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, yaml is a superset of json, so it makes sense; though doesn't https://github.com/rhysd/actionlint cover also the workflow files schema validation?

@m-aciek m-aciek merged commit 83e62d4 into python-docs-translations:main Dec 31, 2024
3 checks passed
@hugovk hugovk deleted the lint branch December 31, 2024 06:26
@hugovk
Copy link
Member Author

hugovk commented Dec 31, 2024

We could also add this repo to https://pre-commit.ci/ so it will autofix PRs?

I think it's a good idea 👍

Please could you add it, if you've not already?

@m-aciek
Copy link
Collaborator

m-aciek commented Dec 31, 2024

I've installed the Pre-commit CI in the repo today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants